export const findItemByTree = (tree, value) => {
  for (let i = 0; i < tree.length; i++) {
    if (tree[i].value === value) {
      return tree[i]
    } else if (tree[i].children && tree[i].children.length > 0) {
      let res = findItemByTree(tree[i].children, value)
      if (res) return res
    }
  }
}
